package com.maoye.ossp.biz.statement.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hotent.base.api.query.QueryFilter;
import com.maoye.ossp.biz.statement.entity.BizStatementBillDetail;
import com.maoye.ossp.biz.statement.service.IBizStatementBillDetailService;
import com.maoye.ossp.common.entity.Page;
import com.maoye.ossp.common.web.BaseController;

/**
 * 订单明细controller类
 * 
 * @author yanghao
 * 
 */
@Controller
@RequestMapping(value = "biz/statement/billDetail/")
public class BizStatementBillDetailController extends BaseController {

	@Resource
	private IBizStatementBillDetailService billDetailService;

	/**
	 * 查看订单明细列表
	 * 
	 * @param statementOrder
	 * @param request
	 * @param response
	 * @param model
	 * @return
	 */
	@RequestMapping(value = "list")
	public String list(BizStatementBillDetail bizStatementBillDetail,
			HttpServletRequest request, HttpServletResponse response,
			Model model) {
		String billNo = request.getParameter("billNo");
		QueryFilter queryFilter = getQuerFilter(request, bizStatementBillDetail);
		queryFilter.getParams().put("billNo", billNo);
		Page<BizStatementBillDetail> page = (Page<BizStatementBillDetail>) billDetailService
				.find(queryFilter);
		model.addAttribute("page", page);
		return resultPage("/biz/statement/statementBillDetail/list", model,
				request);
	}

}
